cmake_minimum_required(VERSION 3.10)
project(StorageManagerTest)

# 设置C++标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 查找udev库
find_library(UDEV_LIBRARY udev)
if(NOT UDEV_LIBRARY)
    message(FATAL_ERROR "libudev not found")
endif()

# 查找blkid库
find_package(PkgConfig REQUIRED)
pkg_check_modules(BLKID REQUIRED blkid)

# 添加可执行文件
add_executable(StorageManagerTest
    StorageManager.cpp
    TestMain.cpp
)

# 包含blkid的头文件目录 
target_include_directories(StorageManagerTest PRIVATE ${BLKID_INCLUDE_DIRS})

# 链接库
# 链接库
target_link_libraries(StorageManagerTest PRIVATE 
    ${UDEV_LIBRARY}
    ${BLKID_LIBRARIES}
    stdc++fs
)
